import React from 'react'
import ImportUserModal from '../../common/import_user_modal'
import { Divider, Result } from 'antd'

class UsersImportBody extends React.Component {

  state = {
    status: 'info',
    msg: '请导入数据'
  }

  render () {
    const {status, msg} = this.state

    return <div>
      <ImportUserModal
        callback={(status, msg) => this.setState({status, msg})}/>
      <Divider/>
      <Result
        status={status}
        title={status === 'error' ? '导入失败' : msg}
        subTitle={status === 'error' ? msg : null}
      />
    </div>
  }
}

export default UsersImportBody
